<template>
    <div class="social-container">
        <div class="social-img-container">
            <img :src="info.src" @click="link"/>
        </div>
    </div>
</template>

<script>
export default {
    props:['info'],
    methods: {
        link() {
            if(this.info.link.length != 1)
                window.open(this.info.link,"_blank")
            else
                window.open(this.info.link,"_self")
        }
    },
    watch: {
        info() {
            console.log(this.info)
        }
    }
}
</script>

<style lang="less" scoped>
    .social-container {
        display: inline-block;
        width: 30px;
        margin-left: 8px;
        img {
            width: 100%;
        }
        img:hover {
            cursor: pointer;
        }
    }
    
</style>